<template>
  <div class="result">
    <div>{{ textResult }}</div>
    <div v-if="textResult == '当天'">{{ timeResult }}</div>
    <div v-else>{{ timeBegin }} 至 {{ timeEnd }}</div>
  </div>
</template>

<script>
export default {
  inject: ['dateList'],
  data() {
    return {}
  },
  computed: {
    textResult() { return this.dateList.activeObj.text },
    timeResult() { return this.dateList.activeObj.time },
    timeBegin() { return this.dateList.activeObj.beginTime },
    timeEnd() { return this.dateList.activeObj.endTime }

  }

}
</script>

<style>
.result {
  font-size: 20px;
}
</style>